package cn.ljy.authority.model;

import cn.ljy.common.model.BaseModel;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;

/**
 * 字典
 * @author ljy
 * @date 2022-8-13 13:31
 */
@ApiModel(value="字典")
@Data
@NoArgsConstructor
public class SysDict extends BaseModel {
    private Long id;
    @NotBlank(message = "字典名不能为空")
    @Length(min = 1, max = 30, message = "字典名长度必须在 {min} - {max} 之间")
    private String name;

    public SysDict(Long id) {
        this.id = id;
    }
}
